<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
	<style>
    	div.error{color:red}
    	lable.error{background-color: #ffcccc}
    	input.error{background-color: #ffcccc}
    </style>
	<title>register</title>
</head>
<body>
	<h1>Register Spitter!</h1>
	<form method="POST" th:object="${spittler}">
		<div class="error" th:if="${#fields.hasErrors('*')}">
			<ul>
				<li th:each="err : ${#fields.errors('*')}" th:text="${err}">Input is Error</li>
			</ul>
		</div>
		
		<label th:class="${#fields.hasErrors('firstName')} ? 'error'">First Name :</label>
		<input th:class="${#fields.hasErrors('firstName')} ? 'error'" th:field="*{firstName}" type="text"></input>
		
		<input type="submit" value="Register"></input>
	</form>
</body>
</html>